const express = require('express');
const expressJoi = require('@escook/express-joi');
const { expressjwt: jwt } = require('express-jwt');
const bodyParser = require('body-parser');
const { reg_login_schema } = require('../schema/user');

const router = express.Router();

const wechatHandler = require('../routerHandler/wechat');

// 获取不限制的小程序码
router.post('/acode', wechatHandler.getWXaCode);

// 获取微信用户信息
router.get('/userInfo', wechatHandler.getWXUserInfo);

// 微信通知回调地址
router.all('/notify', bodyParser.raw({ type: '*/*' }), wechatHandler.notify);

// 微信内容检查接口
router.post('/check-content', wechatHandler.checkContent);

module.exports = router;